import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class ScreenAdapt {
  //ui 设计时屏幕的 宽高
  static final double DEVICE_WIDTH = 1080;
  static final double DEVICE_HEIGHT = 1920;

  static init(BuildContext context) {
    ScreenUtil.instance = ScreenUtil(width: DEVICE_WIDTH, height: DEVICE_HEIGHT)
      ..init(context);
  }

  static px(double px) {
    return ScreenUtil.getInstance().setWidth(px);
  }
}
